#ifndef BUTTON_H
#define BUTTON_H

#include "../shapes/Rectangle.h"
#include "../../input/MouseEvents.h"

class Button : public Rectangle
{
    public:
        
        Button(const Point2D& position, Uint32 background_color);
        
        Event<>& OnClick();
        
    private:
        
        Event<> _on_click;
        
        Functor<Button,const Point2D&,int> _handle_mouse_down;
        
        void HandleMouseDown(const Point2D& pos, int mouse_button);
};

#endif
